<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>优惠券派送</title>
    <link rel="stylesheet" href="/Public/css/bootstrap.min.css">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/toast.css">
    <link rel="stylesheet" href="/Public/css/gxxjkefu-normalize.css">
    <link rel="stylesheet" href="/Public/css/model.css">
    <style>
        .content_box {
            margin: 0 auto;
            width: 80%;
        }

        .content_box span {
            display: inline-block;
            width: 100px;
        }

        .content_box select {
            width: 200px;
        }

        .item_box {
            padding-left: 80px;
            margin: 10px 0;
        }
    </style>
</head>
<body>
<div id="main_C">
    <div class="content_box">
        <div class="item_box" style="padding: 0">
            <!--<span>选择标识</span>-->
            <div class="input-group-btn" style="display: block;">
                <select id="flag" name="type" class="form-control"
                        style="color: #959595;background: #eeeeee;border-bottom-left-radius: 3px;border-top-left-radius: 3px;">
                    <option value="1">有-借款需求</option>
                    <option value="2">无-借款需求</option>
                    <option value="3">无法沟通用户</option>
                </select>
            </div>

            <div class="" style="display: block;">
                <textarea style="width: 300px;height: 100px;margin: 20px 0;" id="content" placeholder="特殊备注">
                </textarea>
            </div>
        </div>
        <button style="width: 100px;margin-right: 60px" class="btn btn-info" id="search_submit"
                onclick="user_flag()">确定
        </button>
    </div>

</div>

<script src="/Public/js/jquery-3.2.1.js"></script>
<script src="/Public/js/layer/layer.js"></script>
<script src="/Public/js/layui/layui.js"></script>
<script src="/Public/js/toast.js"></script>

<script>
    function user_flag() {
         var phone="<{$phone}>";
        var flag=$('#flag').val();
        var  content=$('#content').val();
        var index = layer.load(1, {
            shade: [0.1, '#fff'] //0.1透明度的白色背景
        });
        var url = "<{$SERVER_NAME}>/User/user_flag_set";

        layer.alert("确定标识", {title: '提示框', icon: 3}, function (index) {
            $.post(url, {flag: flag, phone: phone,content:content}, function (data) {
                if (data.code == "1001") {
                    layer.alert(data.result, function (index) {
                        window.parent.get_user(phone);
                        var index1 = parent.layer.getFrameIndex(window.name);
                        parent.layer.close(index1);

                    });

                } else {
                    layer.alert(data.result);
                }
            });
            layer.close(index);
        });
        layer.close(index);

    }


</script>


</body>
</html>